<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>楼层节点管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('<spring:message code="common.subbmiting"/>');
                    timeVali($("#btnSubmit"));
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/source/floor/floorNode/">楼层节点列表</a></li>
		<li class="active"><a href="${ctx}/source/floor/floorNode/form?id=${floorNode.id}">楼层节点<shiro:hasPermission name="source:floor:floorNode:edit">${not empty floorNode.id?'修改':'新增'}</shiro:hasPermission><shiro:lacksPermission name="source:floor:floorNode:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="floorNode" action="${ctx}/source/floor/floorNode/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">楼层组：</label>
			<div class="controls">
				<form:input path="groupId" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">物理楼层：</label>
			<div class="controls">
				<form:input path="floorId" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">对应图片：</label>
			<div class="controls">
				<form:hidden id="floorimg" path="floorimg" htmlEscape="false" maxlength="255" class="input-xlarge"/>
				<sys:ckfinder input="floorimg" type="files" uploadPath="/source/floor/floorNode" selectMultiple="true" langCode="${langCode}"/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="source:floor:floorNode:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="<spring:message code='common.save'/>"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="<spring:message code='common.back'/>" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>